<script setup lang="ts">

import Child from "./Child.vue";
import {ref} from "vue";

const car = ref("su7")
const toy = ref()
const getToy = (value:String) => {
  toy.value = value
}
</script>

<template>
 <div>
   <div class="father">
     <h3>父组件，</h3>
     <h4>我的车：{{ car }}</h4>
     <h4>儿子给的玩具：{{ toy }}</h4>
     <Child :car1="car" @get-toy="getToy"/>
   </div>
 </div>
</template>

<style scoped>

</style>